if(object == null) 
throw new SimpleException("no object was unmarshalled from xml");

if (!object.getClass().equals(childClass)){
throw new SimpleException(	"child object of type "+ object.getClass() + " from received content was not of expected class " + childClass);
}